﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DbSharp.Framework.TestEngine;
using System.Windows.Forms;

namespace DbSharp.GuiRunner.View
{
    class GuiCaseFileLoadedNotifier : ICaseFileLoadedNotify
    {
        private RichTextBox m_OutputTextbox;

        public GuiCaseFileLoadedNotifier(RichTextBox outputTextbox)
        {
            m_OutputTextbox = outputTextbox;
        }

        #region ICaseFileLoadedStatusNotify Members

        public void UpdateStatus(CaseFileLoadedReport summary)
        {
            string outputText = summary.ToString();
            if (string.IsNullOrEmpty(outputText) == false)
            {
                m_OutputTextbox.AppendText(summary.ToString());
                m_OutputTextbox.AppendText(Environment.NewLine);
            }
        }

        #endregion
    }



}
